package org.hcf.api;

import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.hcf.api.config.PluginConf;
import org.hcf.api.config.ResConf;
import org.hcf.api.config.TencentConf;
import org.hcf.common.util.SpringContextUtil;
import org.hcf.data.SqlHelper;
import org.hcf.data.entity.ChatUser;
import org.hcf.data.service.IChatUserService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@Slf4j
@EnableTransactionManagement
@Import(SpringContextUtil.class)
@SpringBootApplication
@ComponentScan(basePackages = {"org.hcf.data", "org.hcf.api"})
@EnableScheduling
@EnableCaching
@EnableAsync
@MapperScan({"org.hcf.data.mapper"})
public class TencentApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(TencentApplication.class, args);
//        ChatUser user = SqlHelper.getService(IChatUserService.class).getById(100000);
//        System.out.println(JSONObject.toJSONString(user));
        System.out.println("启动完成");
    }
}